﻿<UserControl x:Class="CalculatorProject.View.AdvancedInputButtonsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:View="clr-namespace:CalculatorProject.View"
             xmlns:converter="clr-namespace:Graphing;assembly=Graphing"
             mc:Ignorable="d" MinHeight="150" MinWidth="360" >
    
    <!-- Resources -->
    <UserControl.Resources>
        <!-- Converter for the Enum. -->
        <converter:EnumBoolConverter x:Key="EnumConverter" />
    </UserControl.Resources>

    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        
    <!-- Radio Buttons -->
        <!-- Helps determine if the User wants to Calculate in Radians/Degrees. This sets the Enum Properties in the ViewModel. -->
        <RadioButton Name="RbDegrees" Content="Degrees" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" IsChecked="{Binding Path=AngleType, Converter={StaticResource EnumConverter}, ConverterParameter=Degrees, Mode=TwoWay}" />
        <RadioButton Name="RbRadians" Content="Radians" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="2" IsChecked="{Binding Path=AngleType, Converter={StaticResource EnumConverter}, ConverterParameter=Radians, Mode=TwoWay}" />
        
    <!-- Buttons -->
        <!-- Basic View -->
        <View:InputButtonsView Grid.Column="3" Grid.Row="1" Grid.ColumnSpan="6" Grid.RowSpan="5" />
    <!-- Trig functions -->
        <!-- sin -->
        <Button Content="sin" Grid.Column="0" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="sin("  MinHeight="30" MinWidth="40" Name="BtnSin" Focusable="False" />
        
        <!-- cos -->
        <Button Content="cos" Grid.Column="1" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="cos(" MinHeight="30" MinWidth="40" Name="BtnCos" Focusable="False" />
        
        <!-- tan -->
        <Button Content="tan" Grid.Column="2" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="tan(" MinHeight="30" MinWidth="40" Name="BtnTan" Focusable="False" />
        
        <!-- csc -->
        <Button Content="csc" Grid.Column="0" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="csc(" MinHeight="30" MinWidth="40" Name="BtnCsc" Focusable="False" />
        
        <!-- sec -->
        <Button Content="sec" Grid.Column="1" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="sec(" MinHeight="30" MinWidth="40" Name="BtnSec" Focusable="False" />
        
        <!-- cot -->
        <Button Content="cot" Grid.Column="2" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="cot(" MinHeight="30" MinWidth="40" Name="BtnCot" Focusable="False" />
        
        <!-- sinh -->
        <Button Content="sinh" Grid.Column="0" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="sinh(" MinHeight="30" MinWidth="40" Name="BtnSinh" Focusable="False" />
        
        <!-- cosh -->
        <Button Content="cosh" Grid.Column="1" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="cosh(" MinHeight="30" MinWidth="40" Name="BtnCosh" Focusable="False" />
        
        <!-- tanh -->
        <Button Content="tanh" Grid.Column="2" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="tanh(" MinHeight="30" MinWidth="40" Name="BtnTanh" Focusable="False" />

        
        <!-- Root -->
        <Button Content="y√x" Grid.Column="0" Grid.Row="5" Command="{Binding Path=InputButtonCommand}" CommandParameter="y√x" MinHeight="30" MinWidth="40" Name="BtnRoot" Focusable="False" />
        
        <!-- Power -->
        <Button Content="x^y" Grid.Column="1" Grid.Row="5" Command="{Binding Path=InputButtonCommand}" CommandParameter="^" MinHeight="30" MinWidth="40" Name="BtnPower" Focusable="False" />
        
        <!-- 10^x -->
        <Button Content="10^x" Grid.Column="2" Grid.Row="5" Command="{Binding Path=InputButtonCommand}" CommandParameter="10^" MinHeight="30" MinWidth="40" Name="BtnTenPowerX" Focusable="False" />
        
        <!-- log -->
        <Button Content="log" Grid.Column="0" Grid.Row="4" Command="{Binding Path=InputButtonCommand}" CommandParameter="log(" MinHeight="30" MinWidth="40" Name="BtnLog" Focusable="False" />
        
        <!-- ln -->
        <Button Content="ln" Grid.Column="1" Grid.Row="4" Command="{Binding Path=InputButtonCommand}" CommandParameter="ln(" MinHeight="30" MinWidth="40" Name="BtnLn" Focusable="False" />
        
        <!-- Mod -->
        <Button Content="Mod" Grid.Column="2" Grid.Row="4" Command="{Binding Path=InputButtonCommand}" CommandParameter="mod" MinHeight="30" MinWidth="40" Name="BtnMod" Focusable="False" />
        
        
    </Grid> 
</UserControl>
